/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package 垃.圾;

import java.awt.Canvas;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;
import javax.swing.JFrame;

/**
 *
 * @author EnzoZhong
 */
public class NewMain {

      /**
       * @param args the command line arguments
       */
      public static void main ( String[] args ) {
            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment ();
            GraphicsDevice[] gs = ge.getScreenDevices ();
            for ( int j = 0 ; j < gs.length ; j ++ ) {
                  GraphicsDevice gd = gs[j];
                  GraphicsConfiguration[] gc = gd.getConfigurations ();
                  for ( int i = 0 ; i < gc.length ; i ++ ) {
                        JFrame f = new JFrame ( gs[j].getDefaultConfiguration () );
                        Canvas c = new Canvas ( gc[i] );
                        Rectangle gcBounds = gc[i].getBounds ();
                        int xoffs = gcBounds.x;
                        int yoffs = gcBounds.y;
                        f.setSize ( 800 , 600 );
                        f.getContentPane ().add ( c );
                        f.setLocation ( ( i * 50 ) + xoffs , ( i * 60 ) + yoffs );
                        f.pack ();
                        f.show ();
                  }
            }

      }

}
